﻿using static CyberU;
using static CyberU.UI;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;

public class RectComponent : BaseUI
{
    public Rect rect;
    public void Awake()
    {
        base.Awake();
        rect=AsRectTransform(gameObject).rect;
    }
    public float width
    {
        get { return rectTransform.rect.width; }
        set { rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, value); }
    }

    public float height
    {
        get { return rectTransform.rect.height; }
        set { rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, value); }
    }
}